import axios from "axios";

const instance = axios.create({
  baseURL: 'https://www.fastmock.site/mock/cecf5a6b299431ba04ae514b8dc15fdc/goods',
  timeout: 20000,
});

// 请求拦截器
instance.interceptors.request.use(
  (config) => {
    // logic
    return config;
  },
  (error) => {
    return Promise.reject(error);
  });

// Add a response interceptor
instance.interceptors.response.use(
  (response) => {
  // logic
    return response;
  },
  (error) => {
  return Promise.reject(error);
});

export default instance;

